package com.example.ssmxuankeback.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;

@Data
@Schema(name = "ClassPageQueryDTO", description = "班级分页查询参数")
public class ClassPageQueryDTO {

    @Schema(description = "当前页码", example = "1")
    @Min(value = 1, message = "页码最小为1")
    private Integer pageNum = 1;

    @Schema(description = "每页条数", example = "10")
    @Min(value = 1, message = "每页最少1条")
    @Max(value = 100, message = "每页最多100条")
    private Integer pageSize = 10;

    @Schema(description = "班级名称（模糊查询）")
    private String className;

    @Schema(description = "排序字段（可选值：className/createTime）", example = "className")
    private String sortBy;

    @Schema(description = "排序方式（asc/desc）", example = "asc")
    private String sortOrder = "asc";
}